<?php
//classe de conexao PDO

class Conexao extends PDO{

	private $banco = "mysql:host=localhost;dbname=mercado";
	private $usuario = 'root';
	private $senha = '';
	private $conexao;
	
	public function Conexao(){
		try {
			$res = parent::__construct($this->banco, $this->usuario, $this->senha);
			$this->conexao = $res;
			return $this->conexao;
		} catch (PDOException $pdo) {
			$pdo->getMessage();
			return false;
		}		
	}
	
	
}



?>

